/**
 * @(#)PerviyShag.java
 *
 * PerviyShag application
 *
 * @author joompiol
 * @version 1.00 2011/12/5
 */
import java.sql.DriverManager;
import com.mysql.jdbc.Connection;

public class PerviyShag{
	private static Connection conexion;

	public static Connection getConnection(){
		if(conexion==null){
			try{
				Class.forName("com.mysql.jdbc.Driver");

				conexion=(Connection)DriverManager.getConnection("jdbc:mysql://localhost:3306/perviyshag", "root", "123");
			}catch(Exception e){
				e.printStackTrace();
			}
		}
		return conexion;
	}

    public static void main(String[] args){


    	// TODO, add your application code
    	System.out.println(getConnection());
    }
}
